In the past, either one of the following two methods has been mainly used for detecting the center position of a reference mark formed in advance on a printed circuit board, for providing a standard for the machining position, when a printed circuit board is to be machined.
The first method is the so-called "four-points searching method". According to this method, a reference mark is image-recognized to determine the tone transition point on X and. Y axes in an image recognition step, i.e., the coordinates of intersections of the outer periphery of the mark on the X and Y axes, and the averages of the intersections coordinates are computed for the X and Y axes, respectively, and used as the coordinates of the center of the mark.
The second method comprises detecting the center of an area by an image processing. According to this method, the center position of a reference mark is detected by setting a standard circle containing the mark, setting both a plurality of X-direction parting lines arrayed at an equal pitch in parallel with the X axis and a plurality of Y-direction parting lines arrayed at an equal pitch in parallel with the Y axis, separating the standard circle into a plurality of sections by those X and Y-parting lines, deciding the individual tones of the sections by image processing, determining the centers of the sections having the same tone (i.e., the tone indicating the inside of the mark, such as a black tone) along the individual parting lines, and determining those averages individually in the X and Y-directions.
According to the aforementioned first method (i.e., the four-points searching method) of the prior art, there arises a problem that a precise detection of the center cannot be accomplished if the reference mark is not a real circle as a result of a printing error.
For example, if a mark 80 has a chipped portion 80a on the X axis 81a, as shown in FIG. 9, the averages, even if computed, of the tone transforming points Xa and Xb on the X axis 81a and the tone transforming points Ya and Yb on the Y axis 81b have their coordinates located at the position 80b, which is offset rightward of the drawing so that they are largely displaced from the precise center.
According to the second known method (i.e., the method for detecting the center of the area by the image processing), on the other hand, a precise center position can be determined even if the reference mark is not a real circle, but a proper standard circle has to be set. Each time the size of the mark changes, the setting of the standard circle has to be troublesomely renewed. Specifically, if a standard circle 82 is excessively large, as shown in FIG. 10, circuit patterns 84a and 84b outside of a reference mark 83 are contained in the standard circle 82 and also become part of the data for detecting the center of the area, so that the coordinates finally determined are offset from the values of the actual mark center. If the circuit patterns 84a and 84b are in the standard circle, for example, the intrinsic center of the sections on an X-direction parting line 85a should be decided on the basis of the black tone ranges by six sections to the left and by three sections to the right from the Y axis, and their center is located in the position (in the vicinity of the actual mark center) offset by 1.5 sections to the left. However, the section on an X-direction parting line 85b is decided as the black tone for the two sections to the left from the Y axis 86 and for the four sections to the right because of the circuit pattern 84a. If these averages are taken, the determined coordinates are offset rightward from the intrinsic mark center. If the standard circle is excessively small, on the contrary, the reference mark 83 cannot be contained in its entirety within the standard circle so that the precise center cannot possible be determined. Therefore, each time the standard circle is set in the printed circuit board formed with different marks so as to set a standard circle having a proper size according to the reference mark 80, the user must check the image taken by imaging means and select a standard circle having a proper size, so that the operation is difficult to automate.